package concreteClass;

import abstractClass.ReportGenerator;

import java.io.File;
import java.util.List;

/**
 * PDF报告生成器 - 具体子类
 */
public class PdfReportGenerator extends ReportGenerator {
    
    @Override
    protected String generateContent(List<Object> data) {
        StringBuilder content = new StringBuilder();
        content.append("PDF报告内容:\n");
        for (Object item : data) {
            content.append("- ").append(item.toString()).append("\n");
        }
        return content.toString();
    }
    
    @Override
    protected String formatReport(String report) {
        System.out.println("将报告格式化为PDF格式...");
        // 实际的PDF格式化逻辑
        return "PDF格式: " + report;
    }
    
    @Override
    protected File saveReport(String report) {
        System.out.println("保存PDF报告到文件...");
        // 实际的保存逻辑
        return new File("report.pdf");
    }
    
    @Override
    protected boolean needCompression() {
        return true; // PDF报告需要压缩
    }
}